package com.yuyou.tas.lesson.mapper;

import com.yuyou.tas.service.api.lesson.dto.DtoBaseLevel;
import com.yuyou.tas.service.api.lesson.entity.BaseLevel;
import com.yuyou.tas.util.bean.Pagination;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface BaseLevelMapper {
    int deleteByPrimaryKey(Long id);

    int insert(BaseLevel record);

    BaseLevel selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(BaseLevel record);

    int findLevelCount(Pagination<DtoBaseLevel> queryPgn);

    List<DtoBaseLevel> findLevelPageList(Pagination<DtoBaseLevel> queryPgn);

    BaseLevel selectByPKandOrgan(@Param(value="id") Long id, @Param(value="authOrganizationId") Long authOrganizationId);

    BaseLevel selectByCode7Organ(@Param(value="code") String code, @Param(value="authOrganizationId") Long authOrganizationId);
    
    List<BaseLevel> findLevels(Map<String , Object> condition);

    Long findMaxCode(Map<String , Object> condition);

    List<Long> findByIds(Map<String , Object> condition);

}